const sys = uni.getSystemInfoSync()
//状态栏高度
export const getstatusbar = () => {
	return sys.statusBarHeight || 15
}

//胶囊按钮的高度
export const gettitlebar = () => {
	if (uni.getMenuButtonBoundingClientRect) {
		let {
			top,
			height
		} = uni.getMenuButtonBoundingClientRect()
		const titlebar = height + (top - getstatusbar())*2
		return titlebar
	} else {
		return 40
	}
}
//导航栏的高度
export const getnavber = ()=> getstatusbar() + gettitlebar()